//
//  ZFK_albumView.m
//  Drops
//
//  Created by SHG on 16/5/24.
//  Copyright © 2016年 Drops.er. All rights reserved.
//

#import "ZFK_albumView.h"

@implementation ZFK_albumView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    self.bigImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, sWIDTH, sHEIGHT / 4)];
    self.bigImage.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:self.bigImage];
    self.bigTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, sWIDTH, sHEIGHT / 8)];
    self.bigTextLabel.textColor = [UIColor whiteColor];
    self.bigTextLabel.textAlignment = 1;
    self.bigTextLabel.center = self.bigImage.center;
    [self addSubview:self.bigTextLabel];
    self.bigButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.bigButton.frame = self.bigImage.frame;
    self.bigButton.backgroundColor = [UIColor blackColor];
    self.bigButton.alpha = 0.1;
    [self.bigImage addSubview:self.bigButton];
    
    self.s_leftImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, sHEIGHT / 4 + 1, sWIDTH / 3, sHEIGHT / 7)];
    self.s_leftImage.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:self.s_leftImage];
    self.s_leftTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, sWIDTH / 3 - 5, sHEIGHT / 10)];
    self.s_leftTextLabel.center = self.s_leftImage.center;
    self.s_leftTextLabel.textColor = [UIColor whiteColor];
    self.s_leftTextLabel.textAlignment = 1;
    [self addSubview:self.s_leftTextLabel];
    self.s_leftButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.s_leftButton.frame = CGRectMake(0, 0, sWIDTH / 3, sHEIGHT / 7);
    self.s_leftButton.backgroundColor = [UIColor blackColor];
    self.s_leftButton.alpha = 0.1;
    [self.s_leftImage addSubview:self.s_leftButton];
    
    self.s_middleImage = [[UIImageView alloc] initWithFrame:CGRectMake(sWIDTH / 3, sHEIGHT / 4 + 1, sWIDTH / 3, sHEIGHT / 7)];
    self.s_middleImage.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:self.s_middleImage];
    self.s_middleTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, sWIDTH / 3 - 5, sHEIGHT / 10)];
    self.s_middleTextLabel.center = self.s_middleImage.center;
    self.s_middleTextLabel.textColor = [UIColor whiteColor];
    self.s_middleTextLabel.textAlignment = 1;
    [self addSubview:self.s_middleTextLabel];
    self.s_middleButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.s_middleButton.frame = CGRectMake(0, 0, sWIDTH / 3, sHEIGHT / 7);
    self.s_middleButton.backgroundColor = [UIColor blackColor];
    self.s_middleButton.alpha = 0.1;
    [self.s_middleImage addSubview:self.s_middleButton];
    
    self.s_rightImage = [[UIImageView alloc] initWithFrame:CGRectMake(sWIDTH / 3 * 2, sHEIGHT / 4 + 1, sWIDTH / 3, sHEIGHT / 7)];
    self.s_rightImage.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:self.s_rightImage];
    self.s_rightTextLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, sWIDTH / 3 - 5, sHEIGHT / 10)];
    self.s_rightTextLabel.center = self.s_rightImage.center;
    self.s_rightTextLabel.textColor = [UIColor whiteColor];
    self.s_rightTextLabel.textAlignment = 1;
    [self addSubview:self.s_rightTextLabel];
    self.s_rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.s_rightButton.frame = CGRectMake(0, 0, sWIDTH / 3, sHEIGHT / 7);
    self.s_rightButton.backgroundColor = [UIColor blackColor];
    self.s_rightButton.alpha = 0.1;
    [self.s_rightImage addSubview:self.s_rightButton];
    
}

//- (void)bigBtnClick:(UIButton *)button {
//    NSLog(@"idddd===%@", self.b_album.albumId);
//}
//
//- (void)slBtnClick:(UIButton *)button {
//    NSLog(@"idddd==%@", self.sl_album.albumId);
//}
//
//- (void)smBtnClick:(UIButton *)button {
//    NSLog(@"idddd=%@", self.sm_album.albumId);
//}
//
//- (void)srBtnClick:(UIButton *)button {
//    NSLog(@"iddd==%@", self.sr_album.albumId);
//}


- (void)setNeedsLayout {
    [self setNeedsLayout];
}



@end
